const express = require('express')

//引入轮播图数据
const bannerData = require('../data/banner.json')
//引入人气推荐数据
const hotData = require('../data/hot.json')
//引入产品区块数据
const productData = require('../data/product.json')
const router = express.Router()


//接口测试
router.get('/test', (req, res) => {
    res.send('测试成功')
})


//首页-轮播图
router.get('/home/banner', (req, res) => {
    res.send(bannerData)
})

//首页人气推荐
router.get('/home/hot', (req, res) => {
    res.send(hotData)
})

//首页-产品区块
router.get('/home/product', (req, res) => {
    res.send(productData)
})

module.exports = router